package com.liwei.spring.customeditorconfigurer;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.liwei.spring.beanpostprocessor.Animal;
import com.liwei.spring.beanpostprocessor.Fruit;

public class TestMain {
    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        HelloBean helloBean = (HelloBean) ac.getBean("helloBean");
        System.out.println("over");
        Animal animal = (Animal) ac.getBean("animal");
        System.out.println(animal.speak());
        Fruit fruit = (Fruit) ac.getBean("fruit");
        System.out.println(fruit.speak());

    }
}
